Target Constants
Each action is performed upon a particular type of target, usually an element of the movie such as a sprite or a track. The track that is handling a QuickTime event is the default track target. If the event is being handled by a sprite, then that sprite is the default sprite target. For example, if a sprite has a handler for a mouse down event, when it receives that event it becomes the default sprite and its sprite track becomes the default sprite track while the QuickTime event is being handled.
To specify a target, you add a
kActionTarget
atom, and then add one or more of the target type atoms as children. Tracks and sprites may be specified by name, ID, or index. Tracks may additionally be specified by type and index within the type.
For sprite targets, you may specify a particular sprite track as well as a particular sprite in that track.
Constant descriptions
-
kActionTarget
-
You add an atom of this type as a child of a
kActionAtom
, if you wish to specify a target other than the default target for a given action. This atom should contain one or more target-related child atoms.
-
kTargetMovie
-
You add this atom to specify the movie as the action's target. Since the movie is the default target for movie actions, this atom is optional.
-
kTargetTrackName
-
You add an atom of this type to specify a track by name as the action's track target. The leaf data is a Pascal string containing the name of the track. Name matching is not case-sensitive.
-
kTargetTrackType
-
You add an atom of this type to specify a track by type as the action's track target. The leaf data is an
OSType
containing the type of the Track. To specify a particular index within this Track type, you may additionally add a
kTargetTrackIndex
atom. If no
kTargetTrackIndex
is present, an index of one will be used as a default.
-
kTargetTrackIndex
-
You add an atom of this type to specify a track by index as the action's track target. The leaf data is a
long
containing the index of the track. Unless a
kTargetTrackType
atom is present, the index refers to an index within all track types in the movie. By adding a
kTargetTrackType
atom, you may specify an index within a particular track type.
-
kTargetTrackID
-
You add an atom of this type to specify a Track by ID as the action's track target. The leaf data is a
long
containing the ID of the track.
-
kTargetSpriteName
-
You add an atom of this type to specify a sprite by name as the action's sprite target. The leaf data is a Pascal String containing the name of the sprite. You may additionally add Track-related target atoms to specify that the sprite is in a sprite track other than the default sprite track. Name matching is not case sensitive
-
kTargetSpriteIndex
You add an atom of this type to specify a sprite by index as the action's sprite
-
target. The leaf data is a
short
containing the index of the sprite. You may additionally add track-related target atoms to specify that the sprite is in a sprite track other than the default sprite track.
-
kTargetSpriteID
-
You add an atom of this type to specify a sprite by ID as the action's sprite target. The leaf data is a
QTAtomID
containing the ID of the sprite. You may additionally add track-related target atoms to specify that the sprite is in a sprite track other than the default sprite track.
© 1999 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |